TEXT ·_lookup_neon(SB), $0-32
  MOVD input+0(FP),  R0
  MOVD output+8(FP), R1
  MOVD table+16(FP), R2
  MOVD chunks+24(FP),R3

  WORD $0x11003c68		// ADDW $15, R3, R8
  WORD $0x7100007f		// CMPW $0, R3
  WORD $0x1a83b108		// CSELW LT, R8, R3, R8
  WORD $0x7100407f		// CMPW $16, R3
  WORD $0x13047d08		// ASRW $4, R8, R8
  WORD $0x540003ab		// BLT 29(PC)
  WORD $0x2a0803e9		// MOVW R8, R9
  WORD $0x4f02e400		// VMOVI $64, V0.B16
  WORD $0x4f04e401		// VMOVI $128, V1.B16
  WORD $0x4f06e402		// VMOVI $192, V2.B16
  WORD $0xaa0003ea		// MOVD R0, R10
  WORD $0xaa0103eb		// MOVD R1, R11
  WORD $0x3cc10543		// MOVD.P 16(R10), V3
  WORD $0xad421444		// LDP 64(R2), (V4, V5)
  WORD $0xad431c46		// LDP 96(R2), (V6, V7)
  WORD $0xad404450		// LDP (R2), (V16, V17)
  WORD $0xad414c52		// LDP 32(R2), (V18, V19)
  WORD $0xad445454		// LDP 128(R2), (V20, V21)
  WORD $0x6e201c78		// VEOR V0.B16, V3.B16, V24.B16
  WORD $0xad455c56		// LDP 160(R2), (V22, V23)
  WORD $0x4e186084		// VTBL V24.B16, [V4.B16, V5.B16, V6.B16, V7.B16], V4.B16
  WORD $0xad466458		// LDP 192(R2), (V24, V25)
  WORD $0xad476c5a		// LDP 224(R2), (V26, V27)
  WORD $0x6e211c65		// VEOR V1.B16, V3.B16, V5.B16
  WORD $0x4e036206		// VTBL V3.B16, [V16.B16, V17.B16, V18.B16, V19.B16], V6.B16
  WORD $0x4e056285		// VTBL V5.B16, [V20.B16, V21.B16, V22.B16, V23.B16], V5.B16
  WORD $0x6e221c63		// VEOR V2.B16, V3.B16, V3.B16
  WORD $0x4ea61c84		// VORR V6.B16, V4.B16, V4.B16
  WORD $0x4e036303		// VTBL V3.B16, [V24.B16, V25.B16, V26.B16, V27.B16], V3.B16
  WORD $0x4ea51c84		// VORR V5.B16, V4.B16, V4.B16
  WORD $0x4ea31c83		// VORR V3.B16, V4.B16, V3.B16
  WORD $0xf1000529		// SUBS $1, R9, R9
  WORD $0x3c810563		// MOVD.P V3, 16(R11)
  WORD $0x54fffd61		// BNE -21(PC)
  WORD $0x531c6d08		// LSLW $4, R8, R8
  WORD $0x6b03011f		// CMPW R3, R8
  WORD $0x5400016a		// BGE 11(PC)
  WORD $0x93407d0a		// SXTW R8, R10
  WORD $0x93407c6b		// SXTW R3, R11
  WORD $0x8b0a0008		// ADD R10, R0, R8
  WORD $0x8b0a0029		// ADD R10, R1, R9
  WORD $0xcb0a016a		// SUB R10, R11, R10
  WORD $0x3840150b		// MOVBU.P 1(R8), R11
  WORD $0xf100054a		// SUBS $1, R10, R10
  WORD $0x386b684b		// MOVBU (R2)(R11), R11
  WORD $0x3800152b		// MOVB.P R11, 1(R9)
  WORD $0x54ffff81		// BNE -4(PC)
  WORD $0xd65f03c0		// RET

TEXT ·_lookup_sve_vla(SB), $0-32
  MOVD input+0(FP),  R0
  MOVD output+8(FP), R1
  MOVD table+16(FP), R2
  MOVD size+24(FP),  R3

  WORD $0x25231fe0
  WORD $0x540003c5
  WORD $0x52802008
  WORD $0x25281fe1
  WORD $0x2538c000
  WORD $0x04bf5028
  WORD $0xd2800009
  WORD $0x54000285
  WORD $0x5280200a
  WORD $0xd280000b
  WORD $0xa4094001
  WORD $0x04603002
  WORD $0x25814422
  WORD $0xa40b4843
  WORD $0x05203964
  WORD $0x04613025
  WORD $0x04190085
  WORD $0x05253063
  WORD $0x04180062
  WORD $0x8b0b010b
  WORD $0x252a1d62
  WORD $0x54ffff04
  WORD $0xe4094022
  WORD $0x8b090109
  WORD $0x25231d20
  WORD $0x54fffe04
  WORD $0x14000005
  WORD $0xe4094020
  WORD $0x8b090109
  WORD $0x25231d20
  WORD $0x54ffffa4
  WORD $0xd65f03c0

TEXT ·_lookup_sve_2048(SB), $0-32
  MOVD input+0(FP),  R0
  MOVD output+8(FP), R1
  MOVD table+16(FP), R2
  MOVD size+24(FP),  R3

  WORD $0x25231fe0
  WORD $0x2518e3e1
  WORD $0xa400a440
  WORD $0x54000125
  WORD $0xd2800008
  WORD $0x04bf5029
  WORD $0xa4084001
  WORD $0x05213001
  WORD $0xe4084021
  WORD $0x8b080128
  WORD $0x25231d00
  WORD $0x54ffff64
  WORD $0xd65f03c0

